package work.xiaohong.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

/**
 * 
 * @author xiaohong
 * @since 2021-10-21 19:27:52
 */
@Getter
@Setter
@TableName("user")
@Schema(name = "User对象", description = "")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID",accessMode = READ_ONLY)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "姓名")
    @TableField("name")
    private String name;

    @Schema(description = "年龄")
    @TableField("age")
    private Integer age;

    @Schema(description = "邮箱")
    @TableField("email")
    private String email;


}
